<?php
namespace Admin\Controller;
use Think\Controller;
class LoginController extends Controller {
	public function index(){
		$this->display();
	}
	public function login(){
		$data['name'] = I('name');
		$data['password'] = md5(I('password'));
		if(M('User')->where($data)->select()){
			echo 1;
			session('xingfeng_name',I('name'));
		}else{
			echo 2;
		}
	}
}